
package com.example.testandroid;

import android.app.Activity;
import android.os.Bundle;

import com.example.testandroid.ScoreCounter.ShootPoint;
import com.example.testandroid.TargetView.PointListener;

public class MainActivity extends Activity {
    private TargetView mTargetView;

    @Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main_activity);
		mTargetView = (TargetView) findViewById(R.id.view_content);
		mTargetView.setPointListener(new PointListener() {
            @Override
            public void onPointDeleted(ShootPoint point) {
                // TODO Auto-generated method stub
            }
            @Override
            public void onPointAdded(ShootPoint point) {
                System.out.println("yadong --- added:" + point);
            }
        });
//		findViewById(R.id.btn).setOnClickListener(new OnClickListener() {
//			@Override
//			public void onClick(View arg0) {
//				for (ShootPoint point : 
//					mTargetView.getAllShootPoint()) {
//					System.out.println("yadong -- " + point);
//				}
//			}
//		});
	}
}
